package com.atguigu.service;
/**
 * @author dl
 * @create 2020-04-25-14:41
 */

import com.atguigu.domain.Book;
import com.atguigu.domain.Page;

import java.util.List;

/**
 * @author Long
 * @date 2020/4/25
 */
public interface BookService {
	/**
	 * get all book
	 * @return List<Book>
	 */
	List<Book> getAllBook();

	/**
	 * save book
	 * @param book
	 * @return true : success false : failed
	 */
	boolean save(Book book);
	/**
	 * update book
	 * @param book
	 * @return true : success false : failed
	 */
	boolean update(Book book);
	/**
	 * delete book
	 * @param book
	 * @return true : success false : failed
	 */
	boolean delete(Book book);
	/**
	 * get one book
	 * @param bookId
	 * @return Book
	 */
	Book getOneBook(Integer bookId);

	/**
	 * paging query object
	 * @param pageNum current page
	 * @param pageSize page size
	 * @return Page paging after object
	 */
	Page<Book> getPage(String pageNum,String pageSize);

	/**
	 * paging query for minPrice and maxPrice
	 * @param pageNum
	 * @param pageSize
	 * @param minPrice
	 * @param maxPrice
	 * @return
	 */
	Page<Book> getPageByPrice(String pageNum,String pageSize,String minPrice,String maxPrice);
}
